//
//  USFriendTagsModel.m
//  usale0001
//
//  Created by mini on 16/11/24.
//  Copyright © 2016年 YU. All rights reserved.
//

#import "USFriendTagsModel.h"

@implementation USFriendTagsModel

@end

@implementation TagsResultparm

+ (NSDictionary *)objectClassInArray{
    return @{@"labelList" : [Labellist class]};
}

@end


@implementation Labellist
- (NSArray *)useridsArray
{
    if (!_useridsArray) {
        self.userids = [self.userids stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@","]];
        _useridsArray = [self.userids componentsSeparatedByString:@","];
    }
    return _useridsArray;
}

- (NSString *)userNames
{
    if (!_userNames) {
        NSMutableString *names = [NSMutableString string];
        for (int i = 0; i < self.useridsArray.count; i++) {
            NSString *userid = self.useridsArray[i];
            NSString *yyid = [NSString stringWithFormat:@"%zd", userid.integerValue * 10];
            NSString *nickname = [USFunction nickNameFromDBbyValue:yyid key:@"yyid"];
            //服务器会
            if (nickname) {
                [names appendString:nickname];
                if (i != self.useridsArray.count - 1) {
                    [names appendString:@","];
                }
            }
        }
        _userNames = names;
    }
    return _userNames;
}

@end


